﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace WenSkinTest
{
    public partial class Form8 : Form
    {
        public Form8()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            consoleWriteLine1.Items.Add("1111" + DateTime.Now.ToString(), Color.Red);
        }

        private void button2_Click(object sender, EventArgs e)
        {
            consoleWriteLine1.Items.Clear();
        }

        private void button3_Click(object sender, EventArgs e)
        {
            consoleWriteLine1.Items.Add("1111" + DateTime.Now.ToString(), Color.Green);
        }

        private void button4_Click(object sender, EventArgs e)
        {
            consoleWriteLine1.Items.Add("1111" + DateTime.Now.ToString());
        }

        private void button5_Click(object sender, EventArgs e)
        {
            Task.Run(async () =>
            {
                for (var i = 0; i < 100; i++)
                {
                    await Task.Delay(300);
                    consoleWriteLine2.Items.Add(i.ToString());
                }
            });
        }
    }
}
